﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;

namespace METU_CMT.Business
{
    public class TeachingAssistant : User
    {
        //private List<Course> assignedCourses;

        public TeachingAssistant(string userName, string surname, string name, string eMail)
        {
            UserName = userName;
            Name = name;
            Surname = surname;
            Email = eMail;
        }

        public TeachingAssistant( int userId )
        {
            UsersTableAdapter _usersTableAdapter = new UsersTableAdapter();
            UserName = _usersTableAdapter.GetUserName(userId);
            UserId = userId;
            Name = _usersTableAdapter.GetName(userId);
            Surname = _usersTableAdapter.GetSurname(userId);
            Email = _usersTableAdapter.GetEMail(userId);
            PhotoFile = _usersTableAdapter.GetPhotoFilePath(userId);
        }

        public TeachingAssistant()
        {
            //assignedCourses = new List<Course>();
        }

        //public List<Course> AssignedCourses
        //{
        //    get { return assignedCourses; }
        //    set { assignedCourses = value; }
        //}

        public override void GoToProfilePage( HttpResponse response )
        {
            response.Redirect("~/TeachingAssistantMainScreen.aspx");
        }

        public override void SetHome(MenuItem menuItem)
        {
            menuItem.NavigateUrl = "~/TeachingAssistantMainScreen.aspx";
        }
    }
}